var ZNumber={};
//格式化 数值类型
ZNumber.parseNum=function(num){
	if(num == "" || num == undefined || num == null){
		return 0;
	}
	return num*1;
};
//a * b
ZNumber.mul=function(a,b){
	return ZNumber.parseNum(a)*ZNumber.parseNum(b);
};
// a / b
ZNumber.div=function(a,b){
	if(a == "" || a == undefined || a == null){
		return 0;
	}
	if(b == "" || b == undefined || b == null){
		return 0;
	}
	if(a==0||b==0){
		return 0;
	}
	return ZNumber.parseNum(a)/ZNumber.parseNum(b);
};
/**
 * 四舍五入
 */
ZNumber.toFixed=function(a,b){
	if(a == "" || a == undefined || a == null){
		return 0;
	}
	if(b == "" || b == undefined || b == null){
		b=2;
	}
	return ZNumber.parseNum(a).toFixed(ZNumber.parseNum(b));
};